<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>

    <title>welcome</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!-- 全局js -->
    <script src="../../js/jquery.min.js?v=2.1.4"></script>
    <script src="../../js/bootstrap.min.js?v=3.3.6"></script>

    <!-- 自定义js -->
    <script src="../../js/content.js?v=1.0.0"></script>


    <!-- Bootstrap table -->
    <script src="../../js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="../../js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="../../js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

    <!-- Peity -->
    <!-- <script src="../../js/demo/bootstrap-table-demo.js"></script> -->
    <script src="../../js/vue/vue.min.js"></script>
    <script src="../../js/util/ajaxFactory.js"></script>
    <script src="../../js/util/crudVueFactory.js"></script>
    <script src="../../js/util/pageMe.js"></script>
    <script src="../../js/config/config.js"></script>
    <script src="../../js/plugins/layer/layer.min.js"></script>
    <script src="../../js/plugins/progressbar/init-mprogress.js"></script>
    <script src="../../js/plugins/progressbar/mprogress.js"></script>
    <script src="../../js/bootstrap-select.min.js"></script>

    <!-- (Optional) Latest compiled and minified JavaScript translation files -->
    <script src="../../js/defaults-zh_CN.min.js"></script>


    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <style type="text/css">
        div {
            font-size: 1.5em;
            font-style: inherit;
            margin-left: 30%;
            margin-top: 10%;
        }
    </style>
</head>

<body>
<div class="hello" id="queryModel">
    <div>
        最多学生的老师:{{name}}<br>
        学生数大于0的老师:{{nameList}}

    </div>
    <hr>
    <button @click="convert">点击获取数据</button>
</div>
<script>
 var queryVue = new Vue({
          el: '#queryModel',
          data:
      {
        'name': "",
        'nameList':""

    },
     created(){
      this.convert();
    },
    methods: {
      convert: function () {

       $z.ajaxPost({
              url: basePath + '/teacher/teacherCount',
              success: function (data) {
                $z.dealCommonResult(data, function () {
                  queryVue.name = data.data.name;
                   queryVue.nameList = data.data.nameList.join();

                })
              }
            })

         }
       }


          })



</script>
</body>
</html>
